//
//  main.cpp
//  P1046
//
//  Created by 洋犀利 on 2019/8/30.
//  Copyright © 2019 洋犀利. All rights reserved.
//

#include <iostream>
using namespace std;
int apples[10] ={0};

int main(int argc, const char * argv[]) {
    int high;
    int number=0;
    //cout<<"start";
    for(int i=0;i<10;i++){
        cin>>apples[i];
        //cout<<"get";
    }
    cin>>high;
    for(int i=0;i<10;i++){
        if(high>=apples[i] || (high+30)>=apples[i]){
            number++;
        }
    }
    cout<<number;
    return 0;
}
